<?php  
defined('APPLICATION_URL')||define('APPLICATION_URL', '/ITjap(tung)/ITjap_finalversion');
session_start();
$userId=$_SESSION['userId'];
if(!isset($userId)) header('Location:'.APPLICATION_URL.'/index.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<!-- head - Finished -->
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<link rel="stylesheet" href="../../css/layout.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="../../css/home.css" type="text/css" media="screen" />
	<link href="../../css/calendar.css"rel="stylesheet" type="text/css">
	<script src="../../js/calendar.js"language="javascript"></script>	
	<title>会議室予約システム</title>
</head>
<!-- /head - Finished -->

<body>
<!-- header area -->
	<div id="header_area">
	  <div id="header">
	    <div id="header_link_area">
	      <a name="pagetop"></a>
	      <div id="header_appeal">会議室予約システム</div>
	      <div id="header_link">
	        <ul>
	           <li class="header_b_1">
                    <a class="header_b_1" href="view_room.php">
                        <img width="56" height="21" alt="ホーム" src="../../images/header/header_b_1.gif">
                    </a>
                 </li>
                 <li class="logout">
                    <a class="header_b_2" href="../../controller/logout.php">
                        <img width="71" height="21" alt="logout" src="../../images/header/header_b_5.gif">
                    </a>
                 </li>
                 <li class="setting">
                    <a class="header_b_3" href="change_Info.php">
                        <img width="155" height="21" alt="setting" src="../../images/header/header_b_6.gif">
                    </a>
                </li>
                <li class="header_b_4">
                    <a class="header_b_4" href="../index.php">
                        <img width="82" height="21" alt="お問い合せ" src="../../images/header/header_b_4.gif">
                    </a>
                </li>
	        </ul>
	      </div>
	    </div>
	    <div id="header_title">
	       <img id="SiteHeader1_imgTitle" src="../../images/header/header_title_1.gif" alt="貸会議室予約" style="height:90px;width:960px;border-width:0px;" /> 
	    </div>
	  </div>
	</div>
<!-- header area-->
	
<!-- pan_area -->
	      <div id="pan_area">
	        <div id="pan">
	          
	        </div>
	      </div>
<!-- pan_area -->
	  
<!-- main_area -->
	<div id="main_top_area">&nbsp;</div>
	    
	<!-- main_middle_area -->   
	<div id="main_middle_area">
	
	    <!-- main area-->
		<div id="main_area">
		
			<!-- main -->
			<div id="main">
				  <!-- navi -->
				      <div id="navi">
				        <ul>
				          <li class="tenanto_yoyaku"><a href="book_room.php" class="navi_b_1"><img src="../../images/navi/tenanto_yoyaku.gif" alt="会議室予約" width="145" height="39" /></a></li>
				          <li class="tenanto_sansho"><a href="view_room.php" class="navi_b_2"><img src="../../images/navi/tenanto_sansho.gif" alt="予約参照" width="145" height="39" /></a></li>
				          <li class="tenanto_setting"><a href="Change_Info.php" class="navi_b_3"><img src="../../images/navi/tenanto_setting.gif" alt="個人情報変更" width="145" height="39" /></a></li>
				          <li class="tenanto_resetpass"><a href="Change_pass.php" class="navi_b_4"><img src="../../images/navi/tenanto_resetpass.gif" alt="パスワード変更" width="145" height="39" /></a></li>
				         
				        </ul>
				      </div>
				   <!-- /navi -->
				   
				   <!-- contents -->
				       <div id="content">
				       		  <h1><img src="../../images/h1_faq.gif" alt="よくあるご質問" /></h1>
				              <!-- search -->
				             <div class="search">
		<!-- FORM XEM CÁC PHÒNG CÒN TRỐNG -->	                
				                <form action="../../controller/getAvailableTimeController.php" method="post">
					                <div class="room">
				                  		<p class="search">会議室（利用をご希望される会議室を選択してください。）</p>
						                  	<?php
						                  	 include '../../models/Model.php';
						                  	 $model=new Model();
						                  	 $room_list=$model->searchAllRoom();
						                  	 //$room_list = array("会議室A","会議室 B", "会議室 C", "会議室 D", "会議ブース H", "会議ブースI", "会議ブースJ");
						                  	 print"<select name=\"name\" id=\"id\">";
						                  	  foreach ($room_list as $room){ 
						                  	  	if($room->getRoomCategory()==1)
							                  	  			$roomName='会議室'.$room->getRoomName();
							                  	else
							                  	  			$roomName='会議ブース'.$room->getRoomName();					                  
											  	print"<option value=\"$roomName\">$roomName</option>";																			  
						                  	 }
						                  	 print"</select>";
										  	?>
				                	</div>
					                <div class="day">
						                  <p class="search">利用日（会議室の利用をご希望される日付（期間）を入力してください。）</p>
						                  
						                  <h1>始まる時間</h1><input name="orderStartTime" type="text" id= "orderStartTime" onclick="showCalendarControl(this);"/>
						                  &nbsp;&nbsp;	
						                  				                  
						                  <h1>終わる時間</h1><input name="orderEndTime" type="text" id="orderEndTime" onclick="showCalendarControl(this);"/>
					                </div>
					                <div class="button_area">
						                  <input type="submit" name="submitDate" value="検索" id="submitDate" />
						                  <input type="button" id="btnTop" value="トップへ戻る" onclick=""/>
					                </div>
				                </form>
				              </div>
				              <!-- search -->				              
				              <!-- result -->				              
				              <!-- result -->
				        </div>
				        </div>
				    <!-- /contents -->
				    
			</div>
	  		<!-- /main -->
			</div>
	    </div>
	     <!-- /main_middle_area -->
	<div id="main_bottom_area">&nbsp;</div>
<!-- main_area -->
      
<!-- FOOTER -->	
	<div id="footer_area">
	  <div id="footer">
	    <ul>
	      <li class="left"><a href="view_room.php">ホーム</a></li>
	      <li><a href="../../controller/logout.php">ログアウト</a></li>
	      <li><a href="register.php">個人情報変更</a></li>
	      <li><a href="../../index.php">Q&A</a></li>
	    </ul>
	    <p>Copyright&nbsp;&copy;&nbsp;Team 08</p>
	  </div>
	</div>
<!-- FOOTER -->	
</body>
</html>